home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-06-01 | 993 b | 32 lines | [TEXT/GEOL] |
- Item 2406519 29-May-90 13:50PDT
-
- From: WILSON6 Wilson, Dave-Personal Concepts,VCA
-
- To: D5295 Reseach SW Design, D Goldman,PRT
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: Re: Assignment to vars
-
- Dave,
-
- With regard to assigning the result of a funciton call to an instance variable,
- such as:
-
- fVariable := MyFunction;
-
- You are safe. Probably. As long as you know your compiler. And never change to
- one you don't know.
-
- My understanding is that MPW Pascal 2.0 would dereference SELF before the
- function was called, making the call dangerous. MPW 3.0 does it the other way,
- so you are safe. I do not know how THINK Pascal treats it.
-
- I believe it is dangerous to write code that depends on the details of how your
- compiler works - hence I like to return the function result into a local
- variable. I think it makes the code more maintainable in the long run.
-
- Dave
-
-
-